package cn.edu.ahstu.flink.scala

/**
 * @author : dong hui
 * @date : 2024/08/19
 */

import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
object FileSource{
    def main(args: Array[String]): Unit = {

        //获取执行环境
        val env = StreamExecutionEnvironment.getExecutionEnvironment

        //加载或创建数据源
        val dataStream = env.readTextFile("test.txt")

        //打印输出
        dataStream.print()

        //程序触发执行
        env.execute()
    }
}
